




	
		
	***********************************************************************************
	***	What Should I Aspire to? Peer Effects in Adolescents’ Friendship Networks	***
	***	April 2022																	***
	***********************************************************************************

	
	
	/*
	
	NOTE: The network graphs plotted may deviate from the ones included in the paper as they are generated without a set 'algorithm' (i.e. set seed). 
	
	Nonetheless, the plotted networks still reveal that the class networks are fully interconnected, warranting class-level fixed effects in the IV estimation. 
	
	*/
	
	
	******************************		
	* Figure A.6. Network graphs *
	******************************
	


	* NOTE: install nwcommands
	search nwcommands-ado

	
	
	***file 1
	clear all
	nwclear
	nwimport class1.xlsx , type(matrix, rownames colnames) name(class1)   
	nwset, directed
	nwsave class1, replace
	nwplot, layout(mds) nodefactor(.5)  edgefactor(.5) arrowfactor(.4) b2title(Class 1 - Mbale (N=108)) color(_nodeid ,legendoff colorpalette(black)) saving (class1)


	***file 2
	clear all
	nwclear
	nwimport class2.xlsx , type(matrix, rownames colnames) name(class2)   
	nwset, directed
	nwsave class2, replace
	nwplot, layout(mds) nodefactor(.5)  edgefactor(.5) arrowfactor(.4) b2title(Class 2 - Mbale (N=60)) color(_nodeid ,legendoff colorpalette(black)) saving (class2)
	
	
	***file 3
	clear all
	nwclear
	nwimport class3.xlsx , type(matrix, rownames colnames) name(class3)   
	nwset, directed
	nwsave class3, replace
	nwplot, layout(mds) nodefactor(.5)  edgefactor(.5) arrowfactor(.4) b2title(Class 3 - Mbale (N=29)) color(_nodeid ,legendoff colorpalette(black)) saving (class3)

	
	***file 4
	clear all
	nwclear
	nwimport class4.xlsx , type(matrix, rownames colnames) name(class4)   
	nwset, directed
	nwsave class4, replace
	nwplot, layout(mds) nodefactor(.5)  edgefactor(.5) arrowfactor(.4) b2title(Class 4 - Mbale (N=55)) color(_nodeid ,legendoff colorpalette(black)) saving (class4)


	***file 5
	clear all
	nwclear
	nwimport class5.xlsx , type(matrix, rownames colnames) name(class5)   
	nwset, directed
	nwsave class5, replace
	nwplot, layout(mds) nodefactor(.5)  edgefactor(.5) arrowfactor(.4) b2title(Class 5 - Mbale (N=66)) color(_nodeid ,legendoff colorpalette(black)) saving (class5)


	***file 6
	clear all
	nwclear
	nwimport class6.xlsx , type(matrix, rownames colnames) name(class6)   
	nwset, directed
	nwsave class6, replace
	nwplot, layout(mds) nodefactor(.5)  edgefactor(.5) arrowfactor(.4) b2title(Class 6 - Sironko (N=55)) color(_nodeid ,legendoff colorpalette(black)) saving (class6)

	
	***file 7
	clear all
	nwclear
	nwimport class7.xlsx , type(matrix, rownames colnames) name(class7)   
	nwset, directed
	nwsave class7, replace
	nwplot, layout(mds) nodefactor(.5)  edgefactor(.5) arrowfactor(.4) b2title(Class 7 - Sironko (N=34)) color(_nodeid ,legendoff colorpalette(black)) saving (class7)

	
	***file 8
	clear all
	nwclear
	nwimport class8.xlsx , type(matrix, rownames colnames) name(class8)   
	nwset, directed
	nwsave class8, replace
	nwplot, layout(mds) nodefactor(.5)  edgefactor(.5) arrowfactor(.4) b2title(Class 8 - Sironko (N=30)) color(_nodeid ,legendoff colorpalette(black)) saving (class8)
	
	
	***file 9
	clear all
	nwclear
	nwimport class9.xlsx , type(matrix, rownames colnames) name(class9)   
	nwset, directed
	nwsave class9, replace
	nwplot, layout(mds) nodefactor(.5)  edgefactor(.5) arrowfactor(.4) b2title(Class 9 - Sironko (N=16)) color(_nodeid ,legendoff colorpalette(black)) saving (class9)

	
	***file 10
	clear all
	nwclear
	nwimport class10.xlsx , type(matrix, rownames colnames) name(class10)   
	nwset, directed
	nwsave class10, replace
	nwplot, layout(mds) nodefactor(.5)  edgefactor(.5) arrowfactor(.4) b2title(Class 10 - Sironko (N=59)) color(_nodeid ,legendoff colorpalette(black)) saving (class10)


	***file 11
	clear all
	nwclear
	nwimport class11.xlsx , type(matrix, rownames colnames) name(class11)   
	nwset, directed
	nwsave class11, replace
	nwplot, layout(mds) nodefactor(.5)  edgefactor(.5) arrowfactor(.4) b2title(Class 11 - Sironko (N=41)) color(_nodeid ,legendoff colorpalette(black)) saving (class11)




	******************
	
	



